<?php
class Shop_Product_Writer{
	private $products = array();
	public function addProduct(ShopProduct $shopProduct)
	{
		$this->products[] = $shopProduct();
	}
	public function write(){
		$str ="";
		foreach($products as $shopProduct){
			$str .= "{$shopProduct->title}";
			$str .= "shopProduct->getProducer()";
			$str .= "({$shopProduct->getPrice()})\n";
		}
		print $str;
	}
}